package com.zhonghui.mes.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhonghui.common.annotation.Excel;
import com.zhonghui.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 生产作业对象 mes_job_assembly
 * 
 * @author zhonghui
 * @date 2022-05-21
 */
@ApiModel("生产作业对象")
public class MesJobAssembly extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    @Excel(name = "编号")
    @ApiModelProperty("编号")
    private Long id;

    /** 作业名称 */
    @Excel(name = "作业名称")
    @ApiModelProperty("作业名称")
    private String jobName;

    /** 计划排产id */
    @Excel(name = "计划排产id")
    @ApiModelProperty("计划排产id")
    private Long plannedProductionId;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("开始时间")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("结束时间")
    private Date endTime;

    /** 生产数量 */
    @Excel(name = "生产数量")
    @ApiModelProperty("生产数量")
    private Double quantity;

    /** 作业状态 */
    @ApiModelProperty("作业状态")
    private Integer status;

    /** 生产作业明细 */
    @ApiModelProperty("生产作业明细")
    private List<MesJobAssemblyItem> mesJobAssemblyItemList;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setJobName(String jobName)
    {
        this.jobName = jobName;
    }

    public String getJobName() 
    {
        return jobName;
    }
    public void setPlannedProductionId(Long plannedProductionId)
    {
        this.plannedProductionId = plannedProductionId;
    }

    public Long getPlannedProductionId()
    {
        return plannedProductionId;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setQuantity(Double quantity)
    {
        this.quantity = quantity;
    }

    public Double getQuantity()
    {
        return quantity;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public List<MesJobAssemblyItem> getMesJobAssemblyItemList()
    {
        return mesJobAssemblyItemList;
    }

    public void setMesJobAssemblyItemList(List<MesJobAssemblyItem> mesJobAssemblyItemList)
    {
        this.mesJobAssemblyItemList = mesJobAssemblyItemList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("jobName", getJobName())
            .append("productionPlanId", getPlannedProductionId())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("quantity", getQuantity())
            .append("status", getStatus())
            .append("mesJobAssemblyItemList", getMesJobAssemblyItemList())
            .toString();
    }
}
